package demo
import org.yaml.snakeyaml.Yaml

def readYaml(){
    def content = new File('deployment.yaml').text
    Yaml parser = new Yaml()
    def data = parser.load(content)
    def kind = data["kind"]
    def name = data["metadata"]["name"]
    println(kind)
    println(name)
}
readYaml()